/*
*         (C) COPYRIGHT NBI Limited
*              ALL RIGHT RESERVED
*
* File        : fastflow/core/visibility_macros.h
* Authors     : dzhang
* Create Time : 2021/09/08 12:14:48
* Description :
*
*/

#ifndef __FASTFLOW_CORE_VISIBILITY_MACROS_H___
#define __FASTFLOW_CORE_VISIBILITY_MACROS_H___

//define FASTFLOW_DLL_IMPORT if your program is dynamically linked to onnxruntime
//No dllexport here. Because we are using a def file
#ifdef _WIN32
#ifdef FASTFLOW_DLL_IMPORT
#define FASTFLOW_EXPORT __declspec(dllimport)
#else
#define FASTFLOW_EXPORT
#endif
#else
#define FASTFLOW_EXPORT
#endif

//SAL2 staffs
#ifndef _WIN32
#define _In_
#define _In_opt_
#define _Out_
#define _Out_opt_
#define _Inout_
#define _Inout_opt_
#define _Frees_ptr_opt_
#define FASTFLOW_ALL_ARGS_NONNULL __attribute__((nonnull))
#else
#include <specstrings.h>
#define FASTFLOW_ALL_ARGS_NONNULL
#endif

#ifdef _WIN32
#define FASTFLOW_MUST_USE_RESULT
#else
#define FASTFLOW_MUST_USE_RESULT __attribute__((warn_unused_result))
#endif

#endif // __FASTFLOW_CORE_VISIBILITY_MACROS_H___